<?php require_once 'source.php';?>
<?php require_once 'config.php';?>
<?php require_once 'dao/dao_db.php';?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo SYSTITLE?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<div class="wrapper">
<?php require_once 'header.php';?>
<div id="layout">
	<div id="leftlay"><?php require_once 'leftnav.php';?></div>
	<div id="rightlay">
		<div class="columntitle"><?php echo PROFILE?></div>
		<div class="columncontent">
			<div id="profile">
			<div style="color:#ff0000;">
				<?php 
					if(isset($_GET['msgcode'])){
						$msgcode=$_GET['msgcode'];
					}else{
						$msgcode='';
					}
					if($msgcode!=''&&$msgcode==1){
						echo SAVESUCCESSFUL;
					}else if($msgcode!=''&&$msgcode==0){
						echo SAVEFAILED;
					}else if($msgcode!=''&&$msgcode==2){
						echo SAVEPASSFAILED;
					}
				?>
			</div>
			<?php 
				if($_SESSION['level']==STUDENT){
			?>
			<form action="service/service_profile.php" method="post">
				<h2><?php echo PERSONALINFO?></h2>
				<div><span>E - MAIL:</span><input type="text" name="email" value="<?php ?>"/></div>
				<div><span><?php echo TELPHONE?>:</span><input type="text" name="telphone" value="<?php ?>"/></div>
				<div><input type="submit" value="<?php echo SAVE?>"/></div>
			</form>
			<?php }?>
			<form action="service/service_profile_pass.php" method="post">
				<h2><?php echo PASSWORDMODIFY?></h2>
				<div><span><?php echo NEWPASS?> :</span><input type="password" name="newpass"/></div>
				<div><span><?php echo PASSWORDCONFIRM?>:</span><input type="password" name="passconfirm"/></div>
				<div><input type="submit" value="<?php echo SAVE?>"/></div>
			</form>
			</div>
		</div>
	</div>
</div>
</div>
</body>
</html>
